package com.ruoyi.project.countrybus.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.countrybus.mapper.SysDriverMapper;
import com.ruoyi.project.countrybus.domain.SysDriver;
import com.ruoyi.project.countrybus.service.ISysDriverService;

/**
 * 司机信息Service业务层处理
 * 
 * @author yangwenbo
 * @date 2022-04-05
 */
@Service
public class SysDriverServiceImpl implements ISysDriverService 
{
    @Autowired
    private SysDriverMapper sysDriverMapper;

    /**
     * 查询司机信息
     * 
     * @param driverId 司机信息主键
     * @return 司机信息
     */
    @Override
    public SysDriver selectSysDriverByDriverId(Long driverId)
    {
        return sysDriverMapper.selectSysDriverByDriverId(driverId);
    }

    /**
     * 通过账号查询司机信息
     *
     * @param driverName 司机账号
     * @return 司机信息
     */
    @Override
    public SysDriver selectSysDriverByDriverName(String driverName) {
        return sysDriverMapper.selectSysDriverByDriverName(driverName);
    }


    /**
     * 通过手机号查询司机信息
     *
     * @param phonenumber 司机账号
     * @return 司机信息
     */
    @Override
    public SysDriver selectSysDriverByDriverPhonenumber(String phonenumber) {
        return sysDriverMapper.selectSysDriverByDriverPhonenumber(phonenumber);
    }

    /**
     * 查询司机信息列表
     * 
     * @param sysDriver 司机信息
     * @return 司机信息
     */
    @Override
    public List<SysDriver> selectSysDriverList(SysDriver sysDriver)
    {
        return sysDriverMapper.selectSysDriverList(sysDriver);
    }

    /**
     * 新增司机信息
     * 
     * @param sysDriver 司机信息
     * @return 结果
     */
    @Override
    public int insertSysDriver(SysDriver sysDriver)
    {
        return sysDriverMapper.insertSysDriver(sysDriver);
    }

    /**
     * 修改司机信息
     * 
     * @param sysDriver 司机信息
     * @return 结果
     */
    @Override
    public int updateSysDriver(SysDriver sysDriver)
    {
        return sysDriverMapper.updateSysDriver(sysDriver);
    }

    /**
     * 批量删除司机信息
     * 
     * @param driverIds 需要删除的司机信息主键
     * @return 结果
     */
    @Override
    public int deleteSysDriverByDriverIds(Long[] driverIds)
    {
        return sysDriverMapper.deleteSysDriverByDriverIds(driverIds);
    }

    /**
     * 删除司机信息信息
     * 
     * @param driverId 司机信息主键
     * @return 结果
     */
    @Override
    public int deleteSysDriverByDriverId(Long driverId)
    {
        return sysDriverMapper.deleteSysDriverByDriverId(driverId);
    }
}
